package com.yh.controller;

import com.yh.entity.UserInfo;
import com.yh.service.RedisLock;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yh
 */
@RestController
@RequestMapping("/api")
public class UserController {
    private RedisLock redisLock;
    public UserController(RedisLock redisLock){
        this.redisLock = redisLock;
    }
    @PostMapping("/updateUser")
    public void updateUser(Long userId){
        redisLock.updateUserInfoRedis(userId);
    }
}
